package com.ap.core.jbehave;

import org.jbehave.core.annotations.BeforeStory;

/**
 * Instances of this class are intended to be added to the Injectable steps providing the reset of the story context.
 */
public class StoryContextClearer {
    private final StoryContext storyContext;

    public StoryContextClearer(StoryContext storyContext) {
        this.storyContext = storyContext;
    }

    @BeforeStory
    public void clearContext() {
        storyContext.clear();
    }
}
